// dlg.txt

//mark_quest_dest(zone,x,y,layer,quest);
//	code =
//		sf(,,2);
//		toggle_quest(19,10);
//		award_party_xp(MED_QUEST_XP);
//	break;

begintalkscript;

variables;

short this_town = 12;

begintalknode;
	tag = 1;
	condition = get_sdf(this_town,1) == 0;
	text1 = "There is a large workshop tucked back in this valley. There are two long sheds in the front, and a huge stone building is up against the cliff face behind them. You recognize the acrid smell in the air, a thick miasma that makes your eyes and nostrils burn.";
	text2 = "Quicksilver is made here. It is a precious substance, used in all forms of alchemy.";
	text3 = "The workshop is not active, though. Something is wrong. The air is icy cold, and you hear constant whispering, just at the edge of perception. Seems like a haunting, hardly the first you have seen.";
	text4 = "Smoke rises from the chimney of the shed to the right. At least someone here is alive.";
	code =
		sf(this_town,1,1);
	break;
	
begintalknode;
	tag = 2;
	condition = get_sdf(this_town,2) == 0;
	text1 = "You round the corner and see a bunch of workers. They are not people of the Gentle Coast. They are leaner and hungrier, and the expressions on their faces are cold. They sit at the table, facing each other, quietly sipping tea. Their thick leather clothes are too warm for this climate.";
	text2 = "The only one of them who reacts to your presence is the man at the head of the table. And that reaction is only a brief nod.";
	code =
		sf(this_town,2,1);
	break;

begintalknode;
	tag = 3;
	condition = get_sdf(this_town,3) == 0;
	text1 = "This patch of river is where the toxic by-products of quicksilver production are dumped. The air is harsh and bitter, and the plants are dead.";
	code =
		sf(this_town,3,1);
	break;

begintalknode;
	tag = 4;
	condition = get_sdf(this_town,4) == 0;
	text1 = "You are surprised to find a lone woman in this cave. A lone, still-alive woman. She is looking to the north. When you come into view, she waves you into the cave.";
	text2 = "She is wearing robes and holds a staff. Anywhere else, you would think she was a wizard. But here in the Ro? Who knows?";
	code =
		sf(this_town,4,1);
	break;

begintalknode;
	tag = 5;
	condition = get_sdf(this_town,5) == 0;
	text1 = "You reach the factory floor of the quicksilver workshop. There are multiple furnaces, all cold, used to extract the precious silvery quicksilver from ore carried here.";
	text2 = "There is a figure waiting for you at the far end of the hall. A ghost. Not surprising. It stares at you and waits for your approach.";
	code =
		sf(this_town,5,1);
	break;

begintalknode;
	tag = 6;
	condition = get_sdf(this_town,6) == 0;
	text1 = "__";
	code =
		sf(this_town,6,1);
	break;

begintalknode;
	tag = 7;
	condition = get_sdf(this_town,7) == 0;
	text1 = "__";
	code =
		sf(this_town,7,1);
	break;

begintalknode;
	tag = 8;
	condition = get_sdf(this_town,8) == 0;
	text1 = "__";
	code =
		sf(this_town,8,1);
	break;

begintalknode;
	tag = 9;
	condition = get_sdf(this_town,9) == 0;
	text1 = "__";
	code =
		sf(this_town,9,1);
	break;

begintalknode;
	tag = 10;
	condition = get_sdf(this_town,10) == 0;
	text1 = "__";
	code =
		sf(this_town,10,1);
	break;

begintalknode;
	tag = 11;
	condition = get_sdf(this_town,11) == 0;
	text1 = "__";
	code =
		sf(this_town,11,1);
	break;

begintalknode;
	tag = 12;
	condition = get_sdf(this_town,12) == 0;
	text1 = "__";
	code =
		sf(this_town,12,1);
	break;

// MIXED

begintalknode;
	tag = 13;
	condition = 1;
	text1 = "The door is icy cold. It hurts to touch it. You give it a good shove, but the door refuses to budge.";

begintalknode;
	tag = 14;
	condition = 1;
	text1 = "You try to open the door, but it is barred from the inside.";

begintalknode;
	tag = 15;
	condition = 1;
	text1 = "The ghost of Khal is cleaved in two by a final blow. Letting out a furious hiss, it sinks down through the stone, leaving only a tracing of frost behind. The workshop has been freed from its possession.";
	text2 = "Misttalker Vanesa looks around the workshop for a while, looking for other signs of haunting. Finally satisfied, she says, _It is done. This place is clean now, but there are crimes that must be answered for._";
	code =
		if (gf(12,12) > 0)
			rs(2);
	break;
	
begintalknode;
	tag = 16;
	condition = 1;
	text1 = "When you reach this ghost, it starts to look around. It was expecting someone else. It hisses, _I was Khal, and I demand answers! Where is a Misttalker? We demand respect, not a visit from our tormentors!_";
	text2 = "_We are tired of waiting. We are no longer reasonable. Die!_ Ghosts start to rise up through the stone all around you.";
	code =
		activate_hidden_group(4);
		set_attitude(1246,10);
	break;
	
begintalknode;
	tag = 17;
	condition = 1;
	text1 = "Most of the workers here are a cold folk. They look straight ahead and ignore you.";
	text2 = "When you press them, they look pointedly at the man at the head of the table. He says, _The High Litha are a disciplined folk. I told them I would speak for us. And I will._";

begintalknode;
	tag = 18;
	condition = 1;
	text1 = "The High Lithans are back at work. They are slightly friendly now. They express their gratitude by giving you a grim nod as they walk by. How nice.";

begintalknode;
	tag = 19;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 20;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 21;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 22;
	condition = 1;
	text1 = "__";

//// Tihomir

begintalknode;
	tag = 30;
	state = -1;
	nextstate = 10;
	condition = 1;
	question = "Name";
	text1 = "Of the workers in this hall, only one of them is willing to look at you. This young man stands at the head of the table and watches you with distaste. _I am Tihomir,_ he says. _This workshop is a legitimate claim of the High Litha._";
	text2 = "_We are not open for business, Haven. We are challenged._ You look at the workers. They aren't angry or aloof. They are scared.";
	text5 = "Tihomir stands at the head of the table. _What else do you need, Haven?_";
	text6 = "You notice that the workers are starting to calm down. Some of them even steal quick looks at you. They must be recovering from the presence of the shades.";
	action = INTRO;

begintalknode;
	state = 10;
	nextstate = 11;
	condition = 1;
	question = "_Tell me about this workshop._";
	text1 = "He is relentlessly grim as he speaks. _The High Litha produces precious quicksilver. We trade it for the goods we can't produce ourselves. We can make very little on our icy mountains. Only quicksilver and judgment._";

begintalknode;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "_You said this is a legitimate claim?_";
	text1 = "_The Gentle Coast is often raided. They deserve it because they are so soft. However, we are not a raid. We paid well for this land, and we can use it as ours. This soil is High Litha._";

begintalknode;
	state = 11;
	nextstate = 12;
	condition = 1;
	question = "_How do you create quicksilver?_";
	text1 = "_The cinnabar is mined from our high peaks. Then we carry it down the mountain to the Gentle Coast to heat it, so that the quicksilver can emerge._";

begintalknode;
	state = 12;
	nextstate = -1;
	condition = 1;
	question = "_Why do you cook the cinnabar down here?_";
	text1 = "_The process creates noxious fumes and substances, which must be dumped. We would rather dump them in the Gentle Coast than in our own lands._";

begintalknode;
	state = 10;
	nextstate = 13;
	condition = 1;
	question = "_What is the High Litha?_";
	text1 = "_We are the highest, oldest province. We live on the high, icy peaks of the Rokaj. Many find us cold and harsh. To outsiders, we are._";

begintalknode;
	state = 13;
	nextstate = -1;
	condition = 1;
	question = "_I'd like to know more about the High Litha._";
	text1 = "_You are a [P], come to judge the Rokaj. You will come to our lands soon enough. Then you will learn all that you need to._";
	text2 = "Stern, humorless, and incapable of a straight answer. Your mother would like Tihomir.";

begintalknode;
	state = 10;
	nextstate = 14;
	condition = gf(12,11) < 2;
	question = "_You seem to be having problems._";
	text1 = "_We are. Our workshops are full of hostile spirits. They came out of the walls, screeching and driving us out. We can't work like this._";
	text2 = "_We are taking steps to reclaim our workshop, but it is difficult._";

begintalknode;
	state = 14;
	nextstate = -1;
	condition = 1;
	question = "_Where did these shades come from?_";
	text1 = "_They are the ghosts of the dead. What dead? What do they want? Were they killed here or somewhere else? We don't know. Only a Misttalker can get sense out of them._";

begintalknode;
	state = 14;
	nextstate = -1;
	condition = 1;
	question = "_Perhaps I can help you._";
	text1 = "_Perhaps. You can use brutality. That is what Haven does in the Ro. If you can help us, we will pay._";

begintalknode;
	state = 14;
	nextstate = 15;
	condition = 1;
	question = "_How is the problem being dealt with?_";
	text1 = "_When the shades emerged and howled at us, we sent for Misttalker Vanesa right away. It is the correct way. When the ghosts slip out of the icy peaks, they must be reined in._";

begintalknode;
	state = 15;
	nextstate = -1;
	condition = 1;
	question = "_Misttalker?_";
	text1 = "_The High Litha is the land of ghosts. Ghosts are hard to see and even harder to talk to. The Misttalkers of the High Litha drink quicksilver potions to gain sharper perception. Then they can find out what the ghosts want to say._";
	
begintalknode;
	state = 15;
	nextstate = -1;
	condition = 1;
	question = "_And how is Misttalker Vanesa doing?_";
	text1 = "For the first time, Tihomir seems uncertain. _Well ... She must be doing well. She came highly recommended. However, she has been in the workshop for a long time._";

begintalknode;
	state = 10;
	nextstate = 16;
	condition = gf(12,11) == 1;
	question = "_I have purged your workshop of shades._";
	text1 = "_Yes. We felt the change. We are grateful. We of the High Litha are cold, but we are not selfish or thoughtless._";
	code =
		sf(12,11,2);
	break;
	
begintalknode;
	state = 16;
	nextstate = -1;
	condition = gf(12,12) > 0;
	question = "_I'm afraid Misttalker Vanesa is dead._";
	text1 = "_That is truly sad. We will pass word back to the mountain. Sometimes, Misttalkers give all to protect us and bring us their wisdom._";

begintalknode;
	state = 16;
	nextstate = -1;
	condition = 1;
	question = "_Perhaps I could get a reward._";
	text1 = "Tihomir nods. _This is fair. However, I am an alchemist, not a trader. Our negotiations are done by Ajaya, in Laskara. Talk to Ajaya._";

begintalknode;
	state = 10;
	nextstate = -1;
	condition = gf(12,12) > 1;
	question = "_How are things going in the workshop?_";
	text1 = "_We are returning to work. The ghosts are very active, these days. Our Misttalkers need lots of quicksilver._";
	text2 = "_Also, for a reward, be sure to speak with Ajaya in Laskara._";
	code =
		if (gf(10,19) > 1)
			rs(2);
	break;
	
//Misttalker Vanesa

begintalknode;
	tag = 40;
	state = -1;
	nextstate = 40;
	condition = 1;
	question = "Name";
	text1 = "There is a young woman in this cave. Very young. Her robes are threadbare hand-me-downs, cinched in with a broad leather belt. A stoppered gourd hangs from her belt.";
	text2 = "She looks at you. Well, she looks in your general direction. _Hello, Haven. I am Misttalker Vanesa. I have been sent here to practice my trade. You may speak with me._";
	text5 = "Misttalker Vanesa has a hard time concentrating on you. Her eyes dart everywhere, and she constantly listens for sounds beyond your perception. She occasionally takes a sip from the gourd hanging from her belt.";
	action = INTRO;
	code =
		set_attitude(1232,3);
	break;
	
begintalknode;
	state = 40;
	nextstate = 49;
	condition = 1;
	question = "_What is a Misttalker?_";
	text1 = "Her voice is soft and distant. It seems like she sometimes forgets that you are here. _We talk to the ghosts of our dead. We hear their wisdom. We accept their approval. We calm them down when they grow violent._";

begintalknode;
	state = 49;
	nextstate = -1;
	condition = 1;
	question = "_How do you talk to the shades?_";
	text1 = "She takes the gourd from her belt and sips from it. _We drink potions of quicksilver. They help detach us from this world, so that we can see the other one more clearly. This has many rewards._";

begintalknode;
	state = 40;
	nextstate = 41;
	condition = gf(12,11) == 0;
	question = "_Why is there an outbreak of shades here?_";
	text1 = "_In this mine? I am not sure yet. Shades should not be tormenting the lowlanders. I was sent to calm them._";

begintalknode;
	state = 41;
	nextstate = 42;
	condition = 1;
	question = "_Why does the Rokaj have so many ghosts?_";
	text1 = "_All lands have ghosts. They are not listened to, and they fade forever. We do not let our dead go to waste. Our most honored are buried in the peaks of the High Litha, so that their ghosts are bound to us._";

begintalknode;
	state = 42;
	nextstate = -1;
	condition = 1;
	question = "_Why are they so important to you?_";
	text1 = "_The Rokaj is always conquered by outsiders. We accept the guidance of our dead, because nobody else will help us._";

begintalknode;
	state = 40;
	nextstate = 43;
	condition = 1;
	question = "_Tell me about the High Litha._";
	text1 = "_Our province is in the icy peaks of the Rokaj. We bring quicksilver and judgment. We guide our people in dealing with change and with outsiders._";

begintalknode;
	state = 43;
	nextstate = -1;
	condition = 1;
	question = "_And what do you think of Haven?_";
	text1 = "_Our Raasa is our most honored one, the only one who can bring final judgment. You should talk to Raasa Suharum. Me, I only hunt ghosts._";

begintalknode;
	state = 40;
	nextstate = 44;
	condition = gf(12,11) == 0;
	question = "_What are you going to do with the shades here?_";
	text1 = "_I will hear what they have to say. Once I have listened, I will make them return to their rest. Angry shades are a problem._";

begintalknode;
	state = 44;
	nextstate = 45;
	condition = 1;
	question = "_Why is it a problem?_";
	text1 = "_So far, they have only scared the workers here. If they are not pleased soon enough, they will do harm. We value them, but when they are disobedient, they must be calmed._";

begintalknode;
	state = 45;
	nextstate = 46;
	condition = 1;
	question = "_How do you deal with a disobedient shade?_";
	text1 = "_I speak with them. If that does not work, I use force to disperse them. Unfortunately, the shades here are powerful and numerous. More than I expected._";

begintalknode;
	state = 46;
	nextstate = -1;
	condition = gf(12,19) == 0;
	question = "_So what is your plan?_";
	text1 = "_I will follow you. When the shades attack, I will help fight them. You are here for gain, aren't you? We can both profit. For example, now. I feel the shades coming. I feel their anger. Be ready._";
	text2 = "And then several insubstantial, angry spirits flow out of the wall.";
	action = END_TALK;
	
begintalknode;
	state = 40;
	nextstate = 47;
	condition = gf(12,11) > 0;
	question = "_The shades have been defeated._";
	text1 = "_Yes. They have returned to the earth. Haven killed them in the Great Uprising. They sensed you were near, and they came out for revenge. It should not be allowed. Their time is past._";

begintalknode;
	state = 47;
	nextstate = -1;
	condition = 1;
	question = "_What now?_";
	text1 = "_Now the workers can return to work. Perhaps Tihomir will reward you. I will report to the High Litha. This is a dangerous situation. Much is out of balance._";
	text2 = "Then, without a word of thanks or farewell, she turns and leaves the hall. Manners and social graces are, apparently, not huge in the High Litha.";
	action = END_TALK;
	code =
		erase_char(1255);
	break;
	
//

begintalknode;
	tag = 70;
	state = -1;
	nextstate = 70;
	condition = 1;
	question = "Name";
	text1 = "When Misttalker Vanesa gets close to the ghost, it turns to face her. It solidifies into the form of a Ro warrior, long dead. It ignores you.";
	text2 = "Vanesa says, _Ghost, this is not your land and not your place. You must return to the earth until you are called forth._";
	code =
		activate_hidden_group(4);
		set_attitude(1246,10);
	break;
	
begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "_I am [N], [P] of Haven._";
	text1 = "The ghost turns toward you and lets out a hiss. _Haven, you are our tormentor. We will not speak with you._";
	text2 = "Vanesa whispers, _Perhaps I should be the one who speaks._";

begintalknode;
	state = 70;
	nextstate = 71;
	condition = 1;
	question = "Listen.";
	text1 = "The ghost says, _I was Khal. I say Haven has returned. It walks free. Khal died to fight Haven. We all died in the Great Uprising. You never avenged us. You failed us, so we must act._";

begintalknode;
	state = 71;
	nextstate = -1;
	condition = 1;
	question = "_Perhaps I can negotiate with you._";
	text1 = "The ghost glares at you. The room grows icy cold. The chill sinks into your bones.";
	text2 = "Vanesa says, _That didn't help._";
	code =
		set_char_status(30000,1,5);
		set_char_status(30000,5,5);
	break;
		
begintalknode;
	state = 71;
	nextstate = 72;
	condition = 1;
	question = "Listen more.";
	text1 = "Vanesa says, _This is a time of change. Haven will be made to answer for its deeds. However, you will not be involved. You must rest. This is not your place or time._";
	text2 = "The shade says, _We have been trapped in this land of cowards and weaklings for a hundred years, watching our homeland rot. And you want us to rest? Return to the earth? No! We will rise at last!_";
	
begintalknode;
	state = 72;
	nextstate = -1;
	condition = 1;
	question = "_We don't need to fight._";
	text1 = "The shade isn't listening anymore. Vanesa says, _Actually, I think we do._";
	text2 = "And then ghosts rise up through the earth all around you. When they appear, a faint shield appears around Khal.";
	action = END_TALK;

begintalknode;
	state = 72;
	nextstate = -1;
	condition = 1;
	question = "Prepare for battle.";
	text1 = "You draw your weapons. So does Vanesa. The shade throws its arms wide, and ghosts rise up through the earth all around you.";
	text2 = "When they appear, a faint shield appears around Khal.";
	action = END_TALK;



//

begintalknode;
	tag = 100;
	state = -1;
	nextstate = 100;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 100;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

//

begintalknode;
	tag = 130;
	state = -1;
	nextstate = 130;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 130;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

//

begintalknode;
	tag = 160;
	state = -1;
	nextstate = 160;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 160;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";
		
//

begintalknode;
	tag = 190;
	state = -1;
	nextstate = 190;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 190;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";
				